<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<script type="text/javascript" src="http://localhost/meilishuo/Static/jquery/jquery-1.7.2.min.js">
	
</script>
<script type="text/javascript">
	$(function(){
		$("#nav .outer .container .top_cate").hover(function(){
			$(this).children('.second_stage').show();
		},function(){
			$(this).children('.second_stage').hide();
		})
	})
</script>
<!--顶部登录注册区域开始-->
	<div id="top">
		<div class="head">
			<ul class="container">
				    <?php if($hd['session']['username'] && $hd['session']['uid']){ ?>
					<li><a class="out" href="<?php echo U('Member/out');?>">退出</a></li>
					<li class="myself"><a  href=""><img src="http://localhost/meilishuo/template/default/img/my_face.jpg" class="my_face" alt="" /><?php echo $hd['session']['username'];?></a></li>
					<li><a href=""><span class="my_love"></span>我的喜欢</a></li>
				<?php }else{ ?>
				<li><a class="first" href=""><span class="weixin"></span>微信登陆</a></li>
				<li><a href=""><span class="qq"></span>QQ登陆</a></li>
				<li><a href="<?php echo U('Member/login');?>">登陆</a></li>
				<li><a href="<?php echo U('Member/register');?>">注册</a></li>
				<?php } ?>
				<li><a href="<?php echo U('Cart/ajax_add_cart');?>"><span class="my_car"></span>我的购物车<i class="num">    <?php if($_SESSION['cart']['goods']){ ?> <?php  echo count($_SESSION['cart']['goods']) ?><?php }else{ ?>0<?php } ?> </i></a></li>
				<li><a href="<?php echo U('Porder/index');?>"><span class="my_order"></span>我的订单</a></li>
				<li><a href=""><span class="download"></span>下载App</a></li>
				<li><a class="custom" href="">客户服务</a></li>
			</ul>
		</div>
	</div>
	<!--顶部登录注册结束-->
	<!--搜索区域开始-->
		<div id="search"><!--search-->
			<div class="outside"><!--outside-->
				<a class="logo" href=""></a>
				<div class="container"><!--container-->
					<div class="baobei">
						<a href="" class="cat">
							宝贝<span class="triangle"></span>
						</a>
					</div><!--baobei-->
					<div class="magnifier"></div>
					<input placeholder="搜索流行商品" class="search_content" type="text" />
					<input class="sub" type="submit" value="搜索" />
				</div><!--container-->
			</div><!--outside-->
		</div><!--search-->
	<!--搜索区域结束-->
	
	<!--导航条开始-->
	<div id="nav">
		<div class="outer">
			<ul class=container>
				<li><a class="first" href="<?php echo U('Index/index');?>">首页</a></li>
				<?php $cate=K('Category')->get_all_data(array('pid'=>0));
		
		foreach ($cate as $k => $v) {
			$cate[$k]['son']=K('Category')->get_all_data_notree(array('pid'=>$v['cid']));
			foreach ($cate[$k]['son'] as $key => $value) {
				$cate[$k]['son'][$key]['son']=K('Category')->get_all_data_notree(array('pid'=>$value['cid']));
			}
		} ?>
				<?php foreach ($cate as $k=>$v){?>
				<li class="top_cate">
					<a class="" href="<?php echo U('List/index',array('cid'=>$v['cid']));?>"><?php echo $v['cname'];?><span class="triangle"></span></a>
					<div class="second_stage">
						<?php foreach ($v["son"] as $key=>$value){?>
						<a href="<?php echo U('List/index',array('cid'=>$value['cid']));?>"><?php echo $value['cname'];?></a>
						<?php }?>
					</div><!--second_stage-->
				</li>
				<?php }?>
			</ul><!--container-->
		</div><!--outer-->
	</div><!--nav-->

	<!--导航条结束-->